<template>
  <div>
    <el-table :data="list" stripe style="width: 100%">
      <el-table-column prop="TableName" label="表名"> </el-table-column>
      <el-table-column prop="Ename" label="扩展名称"> </el-table-column>
      <el-table-column prop="Aid" label="单元组件">
        <template slot-scope="scope">
          <el-tag v-if="scope.row.Aid == 1">文本</el-tag>
        </template>
      </el-table-column>
    </el-table>
    <el-button type="info" @click="OpenAddExendDia">字段扩展</el-button>
    <el-dialog title="字段扩展" :visible.sync="dialogExtend">
      <AddExendView @CloseAddExendDia="CloseAddExendDia"></AddExendView>
    </el-dialog>
  </div>
</template>
<script>
import AddExendView from "../../components/RoleComponet/AddExend.vue";
export default {
  components: {
    AddExendView,
  },
  data() {
    return {
      list: [],
      dialogExtend: false,
    };
  },
  methods: {
    OpenAddExendDia() {
      this.dialogExtend = true;
    },
    CloseAddExendDia() {
      this.dialogExtend = false;
      this.GetRoleInfo();
    },
    ShowAll() {
      this.axios.get("http://localhost:5255/api/Role/GetExtend").then((res) => {
        this.list = res.data.Result.Data;
      });
    },
  },
  created() {
    this.ShowAll();
  },
};
</script>
<style>
</style>